//Calculate average generational, annualized rates of interest in equities post 2000, weighed by population


//----------------------------------------------
//----------------------------------------------
//----------------------------------------------
//----------------------------------------------



use "$base/Outputs/Data/longRunReturnsData.dta", clear

sort countrycode year




keep if countrycode=="WLD" //Keep World



qui tabstat erirG if year>2000 ,statistics(mean) save
quiet tabstatmat lrinterestrate

matrix rownames lrinterestrate = lrinterestrate
matrix colnames lrinterestrate = equitiesG 

mat2txt, matrix(lrinterestrate) saving("$base/Outputs/Tables/lrinterestrate")  replace


clear
